﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebFormArea.aspx.cs" Inherits="Sitio.WebFormArea" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
 <link href ="estilo.css"  rel="Stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            font-size: medium;
        }
        .style2
        {
            font-size: medium;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <div>
            <asp:Label ID="lblMensaje" runat="server" 
                style="font-weight: 700; color: #CC0000; font-size: large;"></asp:Label>
            <strong style="font-size: medium">
            <br />
            AREAS</strong><br />
            <asp:Button ID="btnNuevo" runat="server" onclick="btnNuevo_Click" 
                Text="Nuevo" style="font-size: medium" />
            &nbsp;&nbsp;
            <asp:Button ID="btnBuscar" runat="server" onclick="btnBuscar_Click" 
                Text="Buscar" style="font-size: medium" />
            &nbsp;<asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                style="font-size: medium" Text="Regresar" Width="88px" />
&nbsp;<asp:Panel ID="pnlNuevo" runat="server">
                <table style="width: 100%; height: 122px;">
                    <tr>
                        <td class="style1">
                            &nbsp;</td>
                        <td class="style3">
                            <asp:TextBox ID="txtCodigo" runat="server" Enabled="False" Width="184px" 
                                style="font-size: medium" Visible="False"></asp:TextBox>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Nombre:</td>
                        <td class="style3">
                            <asp:TextBox ID="txtNombre" runat="server" Width="185px" 
                                style="font-size: medium"></asp:TextBox>
                            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtNombre" ErrorMessage="RequiredFieldValidator" 
                                ValidationGroup="Validar">Ingrese Nombre</asp:RequiredFieldValidator>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>                   
                    <tr>
                        <td class="style1">
                            &nbsp;</td>
                        <td class="style3">
                            <asp:Button ID="btnGuardar" runat="server" onclick="btnGuardar_Click" 
                                Text="Guardar" style="font-size: medium" ValidationGroup="Validar" />
                            <br />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pnlBuscar" runat="server">
                <strong><span class="style2">
                <i><b>
                <asp:Label ID="lblMensaje0" runat="server" Font-Size="Large" ForeColor="Red" 
                    style="font-size: medium"></asp:Label>
                </b></i>
                <br />
                <br />
                Resultados<br /> </span></strong>
                <asp:GridView ID="grdAreas" runat="server" AutoGenerateColumns="False" 
                    onrowcommand="ResultGrid_RowCommand" 
                    onselectedindexchanged="grdAreas_SelectedIndexChanged" Width="500px" 
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" EnableModelValidation="True" ForeColor="Black" 
                    GridLines="Horizontal" style="font-size: medium">
                    <EmptyDataTemplate>
                        No se encontraron resultados para la busqueda.
                    </EmptyDataTemplate>
                    <Columns>
                        <asp:BoundField DataField="id" HeaderText="Codigo" Visible="false" />
                        <asp:TemplateField HeaderText="Eliminar">
                            <ItemTemplate>
                                <asp:BUTTON ID="Delete" runat="server" 
                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LAREAS_ID1") %>' 
                                    CommandName="Eliminar"  />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Editar">
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                               <asp:BUTTON ID="Edit" runat="server" 
                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LAREAS_ID1") %>' 
                                    CommandName="Editar"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="SNOMBRE_AREA1" HeaderText="AREA" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
            </asp:Panel>
            <br />
        </div>
    
    </div>
    </form>
</body>
</html>